package com.yiwyn.flowdemo.flow.base;

import com.yiwyn.flowdemo.domain.ProcessInstance;
import lombok.Data;

import java.util.Map;

/**
 * 工作流上下文
 */
@Data
public class FlowContext {

    /**
     * 审批参数
     */
    private Map<String, Object> variables;

    /**
     * 当前节点id
     */
    private String currentNodeId;

    /**
     * 业务主键
     */
    private String businessKey;
    /**
     * 结论
     */
    private String conclusion;
    /**
     * 流程实例
     */
    private ProcessInstance processInstance;

    /**
     * 下一节点
     */
    private String nextNodeId;


    public static FlowContext defaultFlowContext() {
        FlowContext flowContext = new FlowContext();
        flowContext.setConclusion("Y");
        return flowContext;
    }

}
